;; EX-02.scm - Using Lists as Arguments/Parameters/Controls.

(synthdef-send
 (synthdef
  "Lists-as-Parameters"
  ((freq '(440 660)) (amp '(1/8 1/6)))
  (Out.ar 0 (SinOsc.ar freq 0 amp))))

(let ((->& (lambda args (apply -> args) (thread-sleep! 1))))
  (->& "/s_new" "Lists-as-Parameters" -1 1 1)
  (->& "/n_setn" 1 "freq" 2 220 330 "amp" 2 1/16 1/32)
  (->& "/n_setn" 1 "freq" 2 770 880 "amp" 2 1/12 1/24)
  (-> "/g_freeAll" 1))
